################################################################################
# COVARNORM Generates a vector of normally distributed random variables,
# "a vector of covariates" 
# The length of the vector is determined by the first argument 
# passed to the function, the mean and standard deviation defaults are 0, 1, 
# but can be changed by passing a mean and a std in the function call.
# Edited, 6.28.06, MAC
#################################################################################

covarnorm <- function(len,mean=0,std=1) {
none<-vector("integer",len)
test<-std
if(test==0) renorm<-none
else 
renorm<-rnorm(len,mean,std)
return(renorm)
}
#output1 <- covarnorm(100,0,1)
#output1

